<template>
    <div>
        <el-row>
            <el-col :span="4" class="left-nav">
                <el-menu :default-active="dfActive" class="el-menu-vertical-demo">
                    <el-submenu index="1">
                        <template slot="title">
                            <img src="../../assets/imgs/inquire_icon_luke_default.png" alt="">&nbsp;
                            <span>旅客进站</span>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="1-1" @click="jumpTo(1)">票证核验</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="2">
                        <template slot="title">
                            <img src="../../assets/imgs/inquire_icon_jinzhan_default.png" alt="">&nbsp;
                            <span>车辆进站</span>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="2-1" @click="jumpTo(2)">进站登记</el-menu-item>
                            <el-menu-item index="2-2" @click="jumpTo(3)">进站查询</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="3">
                        <template slot="title">
                            <img src="../../assets/imgs/inquire_icon_chuzhan_default.png" alt="">&nbsp;
                            <span>车辆出站</span>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="3-1" @click="jumpTo(4)">出站登记</el-menu-item>
                            <el-menu-item index="3-2" @click="jumpTo(5)">出站查询</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="4">
                        <template slot="title">
                            <img src="../../assets/imgs/inquire_icon_anjian_default.png" alt="">&nbsp;
                            <span>车辆安检</span>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="4-1" @click="jumpTo(6)">安检登记</el-menu-item>
                            <el-menu-item index="4-2" @click="jumpTo(7)">安检查询</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                </el-menu>
            </el-col>
            <!-- 路由 -->
            <el-col :span="20" class="router-container">
                <router-view @sendActive="getActive"></router-view>
            </el-col>
        </el-row>
    </div>
</template>

<script>
    /* 新增S */
    import "../../assets/js/jquery.js";
    // import TableData from "../../components/common/tableData";
    // import qs from "qs";
    /* 新增E */
export default {
    data: function(){
        return {
            dfActive:"1-1"
        }
    },
    methods:{
        jumpTo(i){
            switch(i){
                case 1:this.$router.push("/index/inAndoutaManage/ticketTest");break;
                case 2:this.$router.push("/index/inAndoutaManage/getInLogin");break;
                case 3:this.$router.push("/index/inAndoutaManage/getInSearch");break;
                case 4:this.$router.push("/index/inAndoutaManage/outboundLogin");break;
                case 5:this.$router.push("/index/inAndoutaManage/outboundSearch");break;
                case 6:this.$router.push("/index/inAndoutaManage/safeLogin");break;
                case 7:this.$router.push("/index/inAndoutaManage/safeSearch");break;
            }
        },
        getActive(val){
            this.dfActive=val;
            console.log(this.dfActive)
        }
    },
    computed:{},
    watch:{},
    mounted() {
        this.$emit("sendTag",5);
    }
}
</script>

<!--样式-->
<style scoped>
</style>